#
# Time stamped records for the FileTable abstraction
#
# Adds 2 fields:
# f_ctime - create time of record
# f_mtime - modification time
#

package FileTable::TSRecord;

use strict;
use vars qw(@ISA);
@ISA = qw(FileTable::Record);
use POSIX qw(strftime);

sub store {
    my $self = shift;
    $$self{f_mtime} = strftime "%Y-%m-%d %H:%M:%S", gmtime();
    if (!$$self{f_ctime}) {
	$$self{f_ctime} = $$self{f_mtime};
    }
    $self->SUPER::store(@_);
}
